﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/admin.Master" AutoEventWireup="true"
    CodeBehind="workerMng.aspx.cs" Inherits="Fitment.Admin.workerMng" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="InputContentPlaceHolder" runat="server">
    <asp:Panel ID="Panel1" Height="400px" ScrollBars="Vertical" runat="server">
        <div align="center">
         
            <br />
            <br />
            <table border="0" cellpadding="1" cellspacing="1" class="style3">
                <tr>
                    <td class="style1">
                        <div align="right">
                            工种<span lang="zh-cn">类</span>型：</div>
                    </td>
                    <td class="style2">
                        <div align="left">
                            <asp:TextBox ID="WorkType" runat="server" Width="110px"></asp:TextBox>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="WorkType"
                                ErrorMessage="必填汉字" ValidationExpression="^[\u4e00-\u9fa5]{0,}$"></asp:RegularExpressionValidator>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        <div align="right">
                            优先级：</div>
                    </td>
                    <td class="style2">
                        <div align="left">
                            <asp:TextBox ID="Priority" runat="server" Width="110px">0</asp:TextBox>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="必填数字"
                                ValidationExpression="^[0-9]*$" ControlToValidate="Priority"></asp:RegularExpressionValidator>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        <div align="center">
                            <asp:ImageButton ID="addButton" runat="server" ImageUrl="~/images/add.jpg" OnClick="addButton_Click" />
                        </div>
                    </td>
                    <td class="style2">
                        <div align="center">
                            <asp:ImageButton ID="CancelButton" runat="server" ImageUrl="~/images/cancle2.jpg"
                                OnClick="CancelButton_Click" /></div>
                    </td>
                </tr>
            </table>
            <asp:Button ID="queryButton" runat="server" Text="查询全部" OnClick="queryButton_Click" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="typeButton" runat="server" Text="按工种查询" OnClick="typeButton_Click" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:TextBox ID="search" runat="server" Width="99px"></asp:TextBox>
            <br />
            <br />
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <div align="center">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                            OnPageIndexChanging="GridView1_PageIndexChanging" OnRowDeleting="GridView1_RowDeleting"
                            OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating" Width="371px"
                            OnRowCancelingEdit="GridView1_RowCancelingEdit" CellPadding="4" GridLines="Horizontal"
                            BackColor="White" BorderColor="#336666" BorderStyle="Double" BorderWidth="3px"
                            Style="margin-left: 117px">
                            <RowStyle BackColor="White" ForeColor="#333333" />
                            <Columns>
                                <asp:TemplateField HeaderText="操作" ShowHeader="False">
                                    <EditItemTemplate>
                                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update"
                                            Text="更新"></asp:LinkButton>
                                        &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
                                            Text="取消"></asp:LinkButton>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Edit"
                                            Text="修改"></asp:LinkButton>
                                        &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Delete"
                                            Text="删除" OnClientClick="javascript:return confirm('删除将无法恢复了哦？');"></asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="工种">
                                    <ItemTemplate>
                                        <asp:Label ID="type" runat="server" Text='<%# Bind("WorkType") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="优先级">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="priority" runat="server" Height="19px" Text='<%# Bind("Priority") %>'
                                            Width="73px"></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label3" runat="server" Text='<%# Bind("Priority") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <FooterStyle BackColor="White" ForeColor="#333333" />
                            <PagerStyle BackColor="#336666" ForeColor="White" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#339966" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
                        </asp:GridView>
                    </ContentTemplate>
                    <Triggers>
                        <asp:PostBackTrigger ControlID="GridView1" />
                    </Triggers>
                </asp:UpdatePanel>
            </div>
        </div>
    </asp:Panel>
</asp:Content>
